#pragma once
#include<iostream>
#include <deque>
using namespace std;
template<class T,class Container = deque<T>>
class Stack
{
public:
	void push(const T& x)
	{
		_container.push_back(x);
	}
	void pop()
	{
		_container.pop_back();
	}
	int size()
	{
		return _container.size();
	}
	const T& top()
	{
		return _container.back();

	}
	bool empty()
	{
		return _container.empty();

	}
private:
	Container _container;
};
template<class T, class Container = deque<T>>
class Queue
{
public:
	void push(const T& x)
	{
		_container.push_back(x);
	}
	void pop()
	{
		_container.pop_front();
	}
	int size()
	{
		return _container.size();
	}
	const T& front()
	{
		return _container.front();

	}
	const T& back()
	{
		return _container.back();
	}
	bool empty()
	{
		return _container.empty();
	}
private:
	Container _container;
};
